
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<script src="jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
	
	  $(function(){
		  var data={ 
				   "id":"1cbdfb97-5859-48a4-8301-d54eab818d68",
				   "resourceType":"MessageHeader",
				     "extension":[
				         {
				           "url":"http://www.taikang.com/extension/transaction-id",
				           "valueString":"1cbdfb97-5859-48a4-8301-d54eab818d75"
				         },
				         {
				           "url":"http://www.taikang.com/extension/service-code",
				           "valueString":"SC222_0001"
				         }
				      ],

				   "timestamp":"1989-01-30T12:12:12.341",
				   "event":
				   { 
				       "code":"TKH-CUST-E0003" 
				   },
				   "source":
				   { 
				      "name":"TE001",
				      "endpoint":"10.11.12.13:5432" 
				   },
				   "data":
				   { 
				             "birthDate": "1809-01-31",
				     "certificationcode": "461231180901318908",
				     "certificationtype": 142,
				     "email": "15673611@qq.com",
				     "phone": "13687812312",
				     "name": "旗号",
				     "registorgid": 202,
				     "gender": 4053,
				     "userId": 112,
				     "country":329,
				     "registtime":"2016-01-21 12:21:43",
				     "addresses":[{
				   	"type":5009,
				   	"country":329,
				   	"state":"370000",
				   	"city":"370500",
				   	"district":"370502",
				   	"line":"银河大街"
				     },{
				   	"type":5011,
				   	"country":329,
				   	"state":"370000",
				   	"city":"370500",
				   	"district":"370502",
				   	"line":"金河大街"
				     }]
				            }
				   };
		  console.log(data);
			$.ajax({
            type: 'POST',
            dataType:"json",
            contentType:"application/json",
            data:JSON.stringify(data),
            url: 'http://10.130.203.45:9090/custwor/cust/v1/pgcustomer',
			headers:{
				"TK_AUTHEN_TOKEN":'00178f78-70ae-44e9-be91-721b4d4b9b4a'
				},
            success: function(data){
            	console.log(data);
              }
          });
	  })
   </script>
</html>
